function OpenFileDialog(title, owner, filter){
	var OpenFileName = Interop.Allocate(88);
	
	var s_filter = Interop.Allocate((filter.length + 1) << 1);
	s_filter.WriteString(0, filter);
	for(pos = filter.indexOf("|");pos != -1;pos = filter.indexOf("|", pos+1))
		s_filter.WriteWORD(pos << 1, 0);
	
	var s_file = Interop.Allocate(10242);
	s_file.WriteString(0, (function(){
		var s = "";
		while(s.length < 5120)
			s += " ";
		return s;
		})());
	
	var s_title = Interop.Allocate((title.length + 1) << 1);
	s_title.WriteString(0, title);
	
	OpenFileName.WriteDWORD(0, 88);
	OpenFileName.WriteDWORD(4, owner);
	OpenFileName.WriteDWORD(12, s_filter.DataPtr);
	OpenFileName.WriteDWORD(28, s_file.DataPtr);
	OpenFileName.WriteDWORD(32, 5120);
	OpenFileName.WriteDWORD(48, s_title.DataPtr);
	OpenFileName.WriteDWORD(52, 528900);
	
	if(Interop.Call("comdlg32", "GetOpenFileNameW", OpenFileName)){
		var fs = [];
		var files = [], pos = 0;
		var fetch = s_file.ReadString(0);
		do{files.push(fetch);}while(fetch = s_file.ReadString(pos += (fetch.length + 1) << 1));
		var root = files[0];
		if(files.length > 1){
			for(x in files)
				fs.push(root + "\\" + files[x]);
			fs.shift();
			} else
			fs.push(root);
		return fs;
		}
	return false;
	}